import http from "@/utils/http";
import {EnumAlias} from "@/utils/common";

// 创建发行记录 /{__shortName}/mall/couponIsSueLog/create
export function createDiscountRecord(data?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/create`,
    method: "post",
    data
  });
}
// 查询优惠券记录  /{__shortName}/mall/couponIsSueLog/page
export function queryDiscountRecord(params?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/page`,
    method: "get",
    params
  });
}
//修改优惠券状态 /
export function changeStatus(data?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/changeStatus`,
    method: "post",
    data
  });
}
// 优惠券详情 /{__shortName}/mall/coupon/detail
export function discountDetailRecord(params?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/detail`,
    method: "get",
    params
  });
}
// 更新优惠券信息 //{__shortName}/mall/couponIsSueLog/update
export function updateDiscountRecord(data?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/update`,
    method: "post",
    data
  });
}
// 删除优惠券 /{__shortName}/mall/coupon/delete
export function deleteDiscountRecord(data?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_MALL}/couponIsSueLog/delete`,
    method: "post",
    data
  });
}
